package com.qf.springcloud.controll;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.qf.springcloud.pojo.User;
import com.qf.springcloud.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: xiaobobo
 * @Date: 2019/3/7 15:23
 * @Description:
 */
@RestController
public class PinDaoControll {


    @Autowired
    private UserService userService=null;


    @GetMapping("/getObject")
  /*  @HystrixCommand(fallbackMethod = "getObjectDefault")*/
    public Object getObject(){
        System.out.println("这里是频道的Controll");
        return userService.getUserInfo();
    }

    /**
     * 下面这个方法的参数要和上面的方法保持一致
     * @return
     */
 /*   public Object getObjectDefault(){

        User user = new User(3, "出问题了", "出问题了密码");
        return user;
    }*/


}
